package com.yami.shop.distribution.common.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yami.shop.common.serializer.json.ImgJsonSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * @author yami
 */
@Data
public class DistributionProdDto {

    @Schema(description = "商品名称",required=true)
    private String prodName;

    @Schema(description = "商品ID",required=true)
    private Long prodId;

    @Schema(description = "商品类型(0普通商品 1拼团 2秒杀 3积分)" )
    private Integer prodType;

    @Schema(description = "商品主图",required=true)
    @JsonSerialize(using = ImgJsonSerializer.class)
    private String pic;

    @Schema(description = "商品价格",required=true)
    private Double price;

    @Schema(description = "奖励数额(元/百分比)",required=true)
    private Double awardNumber;

    @Schema(description = "上级奖励数额(元/百分比)")
    private Double  parentAwardNumber;

    @Schema(description = "奖励比例(0 按比例 1 按固定数值)",required=true)
    private Integer awardProportion;
}
